Accelerative noise filtering method for image data

ABSTRACT

An accelerative noise filtering method for image data is provided. The present invention includes selecting four neighboring pixels around a target pixel in a pattern of a cross shape or X shape, and calculating the absolute value of a difference between the target pixel and each of the four neighboring pixels. When the absolute value of the difference of the neighboring pixel is not larger than a standard deviation, a binary value of a bit corresponding to the neighboring pixel is set “1”. When the absolute value of the difference of the neighboring pixel is larger than a standard deviation, a binary value of a bit corresponding to the neighboring pixel is set “0”. Consequently, a 4-bit mapping table including the binary values of the four neighboring pixels is obtained. Then, a new pixel value for replacing the target pixel value is calculated based on a calculation derived from the 4-bit mapping table.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a technology for processing image data.More particularly, the present invention relates to a method to foreffectively and rapidly filtering noise generated when obtaining andcoding image data.

2. Description of the Prior Art

At present, when high compression of image data is performed by means ofimage data coding, preprocessing and post-processing the image data isbelieved to be important.

Several schemes have been proposed to filter noise generated whenobtaining and coding image data, such as median filter, MTM (modifiedtrimmed mean) filter, FMH (FIR-median hybrid) filter, edge preservingsmoothing filter, etc.

The median filter is a nonlinear recovering technology, which isdesigned to filter impulse type noises from the image, while preservingthe edge. Usually the two-dimensional median filter uses a 3×3 or 5×5rectangular mask to enclose the pixel to be filtered. For the medianfiltering method, the gray level of each pixel is replaced by the medianof the gray levels in a neighborhood of that pixel, instead of byaverage. The median of a set of values is such that half the values inthe set are less than m and half are greater than m. In order to performmedian filtering in a neighborhood of a pixel, the values of the pixeland its neighbors are sorted to determine the median, and assign thisvalue to the pixel.

MTM filters are a combination of the median filter and mean valuefilter. Consequently, they can overcome the disadvantage of the medianfilter and improving the noise suppressing effect. In the processing,the median is first derived. The mean value filter is then applied onthe pixel having a value near it as the object, and the result isoutput. A topic to be solved is how to set the object range of the meanvalue filter in consideration of the characteristics of the image. Also,it has been pointed out that, compared with the conventional medianfilter, the edge portion becomes more blurred.

Just as MTM filters, FMH filters are also a combination of the medianfilter and the mean value filter. However, FMH filters differ from MTMfilters in that a mean value filter is applied first. Also, the mask forthe mean value filter has a directionality with quantization in 90° or450°. Compared with MTM filters, they can suppress blurriness of theedge portion, and the amount of computation required can be reducedsignificantly.

The edge preserving smoothing filter is a type of selective smoothingfilter. It performs adaptive switching of the mask according to thelocalized properties of the region. Several types of polygonal masks areinitially defined. Then, the degree of the variation in the pixel valuein the region corresponding to each mask is calculated. Then, among themasks, the mask with the smallest degree of variation of the pixel valueis selected, and the mean value of the pixel value in the regioncorresponding to this mask is output. In this case, the noise can besuppressed while the edge is preserved. However, it has been pointed outthat the fine texture is lost, which is a disadvantage.

The above conventional technologies utilize the mean value of the pixelvalues in the region corresponding to a mask the target pixel centeredas the output of the target pixel. One of the known method for obtainingthe mean value includes selecting eight neighboring pixels x, y, z, a,c, d, e, f around a target pixel b, i.e. the pixel to be filtered, andcalculating an absolute value of a difference between the target pixeland each of the eight neighboring pixels. When the absolute value of thedifference between the target pixel and one of the eight neighboringpixels is larger than a standard deviation, the neighboring pixel isabandoned, not putted in the mean value filtering computation. When theabsolute value of the difference between the target pixel and one of theeight neighboring pixels is not larger than a standard deviation, theneighboring pixel is putted in the mean value filtering computation.Hence, there are several cases such as b′=average(xyzabcdef),b′=average(xyzb) and b′=average(bcdef) etc. to obtain the mean value ofthe target pixel value and the pixel values in the neighborhood thereof.In performing the noise filtering computation, it is possible to use 9,8, 7 . . . etc. as the divisor. For example, when b′=average(xyzabcdef)is used to obtain the mean value of the pixel values, the divisor ofeach of the pixel values putted in the noise filtering computation is 9.The noise filtering computation would be complicated whether implementedusing hardware, software or a combination of hardware and software, andconsume much time.

Accordingly, it is an intention to provide a noise filtering method forimage data, which can overcome the above drawbacks, and effectively andrapidly performs the noise filtering process for image data.

SUMMARY OF THE INVENTION

It is one objective of the present invention to provide an accelerativenoise filtering method for image data, which selects neighboring pixelsamong four neighboring pixels around a target pixel, i.e. the pixel tobe filtered, in a pattern of a cross shape or X shape according to thedegree of similarity between the target pixel and the neighboringpixels. The selected neighboring pixels are putted in a noise filteringcomputation to obtain a new pixel value for replacing the target pixel.The noise filtering process of image data is thus simplified andaccelerated.

It is another objective of the present invention to provide anaccelerative noise filtering method for image data, which employs thebinary index concept to determine the weightings of four neighboringpixels around the target pixel in a pattern of a cross shape or X shapeso as to simply the noise filtering computation.

It is a further objective of the present invention to provide anaccelerative noise filtering method for image data, which can be usedfor preprocessing an original image data.

In order to achieve the above objectives of this invention, the presentinvention provides an accelerative noise filtering method for imagedata. Image data are provided and a pixel to be filtered as a targetpixel is selected from the image data. Then, selecting four neighboringpixels around the target pixel in a pattern of a cross shape or X shapefrom the image data. Calculating an absolute value of a differencebetween the target pixel and each of the four neighboring pixels.Comparing the absolute value of each difference with a standarddeviation, when the absolute value of the difference is not larger thanthe standard deviation, setting a binary value of a bit corresponding tothe neighboring pixel as “1”, and while when the absolute value of thedifference is larger than the standard deviation, setting a binary valueof a bit corresponding to the neighboring pixel as “0”, therebyestablishing a 4-bit mapping table comprising the binary values of thefour neighboring pixels. Calculating a new pixel value for replacing thetarget pixel value based on a calculation (I) derived from the 4-bitmapping table: $\begin{matrix}{X_{0}^{\prime} = \frac{\sum\limits_{i = 0}^{4}{K_{i}X_{i}}}{\sum\limits_{i = 0}^{4}K_{i}}} & (I)\end{matrix}$wherein X₀ represents the target pixel value and X₀′ represents the newpixel value, X₁ (i=1˜4) represents the pixel value of one of the fourneighboring pixels, X₁ belonging to a scan line preceding the scan linethe target pixel value X₀ belonging to, X₂ and X₃ belonging to the samescan line with the target pixel value X₀, X₂ is the neighboring pixelvalue preceding the target pixel value X₀ and X₃ is the neighboringpixel value following the target pixel value X₀, and X₄ belonging to ascan line following the scan line the target pixel value X₀ belongingto, K_(i) (i=0˜4) is a weighting coefficient of one of the fourneighboring pixels and the target pixel, when the binary value of theneighboring pixel is set as “0”, the weighting coefficient K_(i) thereofis set zero, and the neighboring pixels having the binary value “1” areprovided with equivalent weighting coefficients. The present method fornoise reduction substitutes a target pixel with a weighted average ofthe target pixel itself and four neighboring pixels around it in apattern of a cross shape or X shape according to the degree ofsimilarity between the target pixel and the neighboring pixels. Thenoise filtering computation of the present method is thus significantlysimplified and the computation is accelerated.

BRIEF DESCRIPTION OF THE DRAWINGS

The objectives and features of the present invention as well asadvantages thereof will become apparent from the following detaileddescription, considered in conjunction with the accompanying drawings.

FIG. 1A and 1B are a flow diagram of a noise filtering process accordingto one preferred embodiment of the present invention;

FIG. 2A is a diagram illustrating an example of selection of a mask ofthe preferred embodiment of FIG. 1A and 1B;

FIG. 2B is a diagram illustrating an example of selection of a mask ofanother preferred embodiment of the present invention;

FIG. 3 is a mapping table (I) illustrating possible cases applied in thepresent noise filtering method; and

FIG. 4 is a mapping table (II) illustrating possible weightings ofneighboring pixels around a target pixel utilized in a noise filteringcomputation of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

The present invention provides an accelerative noise filtering method,which selects neighboring pixels of a target pixel, i.e. the pixel to befiltered, among four neighboring pixels around the target pixel in apattern of a cross shape or X shape according to the degree ofsimilarity between the target pixel and the neighboring pixels. Then,the selected neighboring pixels are putted into a noise filteringcomputation to obtain a new pixel value for replacing the target pixelvalue. The new pixel value is a weighted average of the pixel values ofthe target pixel and the selected neighboring pixels. By the presentinvention, the noise filtering computation is simplified to only use themodule of shift and adder in hardware. Thus, the noise filtering processfor image data is more simple and easier than the conventional filteringtechnologies. The computation time is significantly reduced.

The present invention will be described in detail in accordance with thefollowing preferred embodiments and with reference to the accompanyingdrawings.

FIG. 1A and 1B depict a flow diagram illustrating a noise filteringmethod according to one preferred embodiment of the present invention.The noise filtering method of the preferred embodiment begins at step101. At step 102, image data are provided and a target pixel P₀, i.e. apixel to be filtered, is selected from the image data. Next, at step103, referring to FIG. 2A, four neighboring pixels P₁, P₂, P₃, P₄ aroundthe target pixel P₀ in a pattern of a cross shape is selected. Theneighboring pixel P₁ belongs to a scan line preceding the scan line thetarget pixel P₀ belongs to. The neighboring pixels P₂ and P₃ belong tothe same scan line with the target pixel P₀. The neighboring pixel P₂precedes the target pixel P₀ and the neighboring pixel P₃ follows thetarget pixel P₀. The neighboring pixel P₄ belongs to a scan line followsthe scan line the target pixel P₀ belongs to.

Then, at step 104, calculating an absolute value of a difference betweenthe target pixel P₀ and each of the four neighboring pixels P₁, P₂, P₃and P₄. Next, at step 105, Comparing the absolute value of thedifference between the target pixel P₀ and any of the neighboring pixelsP₁, P₂, P₃ and P₄ with a standard deviation. When the absolute value ofthe difference is not larger than a standard deviation, go to step 106,setting a binary value of a bit corresponding to the neighboring pixelas “1”. When the absolute value of the difference is larger than astandard deviation, go to step 107, setting a binary value of a bitcorresponding to the neighboring pixel as “0”. At step 108, establishinga 4-bit mapping table including the binary values of the neighboringpixels P₁, P₂, P₃ and P₄ in accordance with the result generated fromstep 105 through 107. Referring to table (I) shown in FIG. 3, the 4-bitmapping table established by step 105 through 107 is matched with onecase shown in the table (I). That is, the 4-bit condition of the fourneighboring pixels P₁, P₂, P₃ and P₄ can map to any one of the sixteencases, case 0 through 15, shown in table (I).

Next, at step 109, a calculation (I) shown in the following is derivedfrom the 4-bit mapping table: $\begin{matrix}{X_{0}^{\prime} = \frac{\sum\limits_{i = 0}^{4}{K_{i}X_{i}}}{\sum\limits_{i = 0}^{4}K_{i}}} & (I)\end{matrix}$wherein X₀ represents the target pixel value and X₀′ represents a new ispixel value for replacing the target pixel value X₀, X₁ (i=1˜4)represents one pixel value of one neighboring pixel P_(i) (i=1˜4) amongthe four neighboring pixels P₁, P₂, P₃ and P₄. K₁ (i=0˜4) is a weightingcoefficient of one of the four neighboring pixels and the target pixel.When the binary value of the neighboring pixel P₁ is set as “0”, theweighting coefficient K₁ thereof is set zero, and the neighboring pixelsamong the four neighboring pixels having the binary value “1” areprovided with equivalent weighting coefficients. Referring to table (II)shown in FIG. 4, showing the weighting coefficients of the target pixelP₀ and the four neighboring pixels P₁, P₂, P₃ and P₄, respectivelymapping each case of table (I). As shown in table (II), when the binaryvalue of each of the neighboring pixels is set “0”, the weightingcoefficient of the target pixel is the value of 1, see case 0. When thebinary value of one of the neighboring pixels is set “1” and the remainsare set “0”, the weighting coefficient of both of the target pixel andthe neighboring pixel is the value of 1/2, see cases 1, 2, 4, and 8.When the binary value of two of the neighboring pixels is set “1” andthe remains are set “0”, the weighting coefficient of both of the twoneighboring pixels is the value of to 1/4 and the weighting coefficientof the target pixel is the value of 1/2, see cases 3, 5, 6, 9, 10, 12and 13. When the binary value of one of the neighboring pixels is set“0” and the remaining three having the binary value “1”, selecting thetwo neighboring pixels among the remaining three into the calculation(I), and the weighting coefficient of both of the two neighboring pixelsis the value of 1/4 and the weighting coefficient of said target pixelis the value of 1/2, see cases 7, 11 and 14. Referring to tables (I) and(II), it is preferable to select the two neighboring pixels among thethree neighboring pixels having binary value “1” belonging to the samescan line with the target pixel to put in calculation (I). For example,see case 7, the two neighboring pixels P₂ and P₃ among the threeneighboring pixels P₂, P₃ and P₄ are selected, and the weightingcoefficient of the two neighboring pixels P₂ and P₃ is the value of 1/4.The target pixel has a weighting coefficient of 1/2 in the case 7. Incase that the image data are captured by a scanner, the pixels easilybecome blurred aligning the direction of the movement of a steppingmotor used for moving a scanning head. Therefore, for case 11 with thethree neighboring pixels P₁, P₃ and P₄ having binary value “1”, it ispreferable to select the two neighboring pixels P₃ and P₄ to put incalculation (I), and the weighting coefficient of each of the twoneighboring pixels P₃ and P₄ is the value of 1/4. The target pixel has aweighting coefficient of 1/2 in the case 11. Furthermore, in case 14with the three neighboring pixels P₁, P₂ and P₄ having binary value “1”,it is preferable to select the two neighboring pixels P₁ and P₂ to putin calculation (I), and the weighting coefficient of each of the twoneighboring pixels P₁ and P₂ is the value of 1/4. The target pixel has aweighting coefficient of 1/2 in the case 14. When the binary value ofeach of the four neighboring pixels is set “1”, the weightingcoefficient of each neighboring pixel is the value of 1/8 and theweighting coefficient of the target pixel is the value of 1/2, see case15.

Then, at step 110, calculating a new pixel value X₀ based on thecalculation (I) derived from the 4-bit mapping table. The weightingcoefficients of the target pixel and the four neighboring pixels areobtained from the 4-bit mapping table. The new pixel value X₀is replacedfor the target pixel value X₀. At step 111, determining if the noisefiltering computation is going to be performed for a next pixel? If itis yes, go to step 112, shifting to the next pixel, and repeating step102 through 111. If it is not, go to step 113, completing the noisefiltering computation.

In accordance with the foregoing, the present invention can only use themodule of shift and adder in hardware to perform the noise filteringprocess. The complexity of the hardware used therefor is significantlyreduced, and the computation time of the present method whetherimplemented by hardware, software or in a combination of hardware andsoftware is much shorter.

Referring to FIG. 2B, in another preferred embodiment, the fourneighboring pixels P₁, P₂, P₃ and P₄ around the target pixel P₀ in anX-shaped pattern are selected. The noise filtering process is the samewith that depicted in FIG. 1A and 1B. That is, step 101 through 113 isrepeated in this preferred embodiment.

The preferred embodiments are only used to illustrate the presentinvention, it is not intended to limit the scope thereof. Manymodifications of the embodiments can be made without departing from thespirit of the present invention.

1-18. (canceled)
 19. A method of filtering noise in image data,comprising: selecting a first pixel having a value to be filtered from afirst scan line of a plurality of scan lines of said image data;selecting one or more pixels having a value from one or more scan linesadjacent to said first scan line; determining an absolute value of adifference between said first pixel value and said selected one or morepixel values; forming a mapping table comprising a plurality of binaryvalues, wherein the plurality of binary values are formed based at leastin part on a comparison of said absolute value with a metric; andreplacing the first pixel value with one of the binary values of saidmapping table.
 20. The method of claim 19, wherein the mapping tablecomprises a 4 bit mapping table.
 21. The method of claim 19, wherein theselected one or more pixels comprise neighboring pixels of the firstpixel.
 22. The method of claim 21, wherein said neighboring pixelscomprise four pixels adjacent to the first pixel.
 23. The method ofclaim 21, further comprising: setting a binary value associated with aneighboring pixel to ‘1’ in response to said absolute value of saiddifference being smaller than said metric; and setting a binary valueassociated with a neighboring pixel to ‘0’ in response to said absolutevalue of said difference being larger than said metric.
 24. The methodof claim 21, further comprising selecting one or more pixels from thesame scan line with respect to said target pixel.
 25. The method ofclaim 24, wherein the neighboring pixels comprise four pixels adjacentto the top, the bottom and the sides of the target pixel.
 26. An articlecomprising a storage medium, having stored thereon instructions that,when executed, result in: selecting a first pixel having a value to befiltered from a first scan line of a plurality of scan lines of a set ofimage data; selecting one or more pixels having a value from one or morescan lines adjacent to said first scan line; determining an absolutevalue of a difference between said first pixel value and at saidselected one or more pixel values; forming a mapping table comprising aplurality of binary values, wherein the plurality of binary values areformed based at least in part on a comparison of said absolute valuewith a metric; and replacing the first pixel value with one of thebinary values of said mapping table.
 27. The article of claim 26,wherein the mapping table comprises a 4 bit mapping table.
 28. Thearticle of claim 26, wherein the selected one or more pixels compriseneighboring pixels of the first pixel.
 29. The article of claim 28,wherein said neighboring pixels comprise four pixels adjacent to thefirst pixel.
 30. The article of claim 28, wherein the instructions, whenexecuted, further result in: setting a binary value associated with aneighboring pixel to ‘1’ in response to the absolute value of saiddifference being smaller than said metric; and setting a binary valueassociated with a neighboring pixel to ‘0’ in response to the absolutevalue of said difference being larger than said metric.
 31. The articleof claim 28, wherein the instructions, when executed, further result inselecting one or more pixels from the same scan line with respect tosaid target pixel.
 32. The article of claim 31, wherein the neighboringpixels comprise four pixels adjacent to the top, the bottom and thesides of the target pixel.
 33. An article comprising a storage mediumhaving stored thereon instructions that, when executed, result in:obtaining pixel values for a plurality of pixels, at least a portion ofthe pixels comprising adjacent pixels; selecting a target pixel of theplurality of pixels; setting at least a portion of the pixel values ofthe plurality of adjacent pixels to a binary value, wherein the settingis based at least in part on a comparison of the target pixel value withpixel values of a plurality of pixels adjacent to the target pixel;determining a weighted average value of the target pixel and the portionof pixels having a binary value; and substituting the weighted averagevalue for the target pixel value.
 34. The article of claim 33, whereinthe plurality of adjacent pixels comprise four pixels adjacent to thetarget pixel.
 35. The article of claim 33, wherein the instructions,when executed, further result in: determining an absolute value of thedifference between the target pixel value and at least one value of theplurality of pixels adjacent to the target pixel; and comparing thedetermined absolute value to a known value.
 36. The article of claim 35,wherein the known value comprises a standard deviation value.
 37. Anapparatus, comprising: circuitry to obtain an image having a pluralityof pixel values associated with a plurality of pixels; circuitry to setat least a portion of the pixel values of the plurality of pixels to abinary value, wherein the setting is based at least in part on acomparison of a first pixel of said plurality of pixels with pixelvalues of a plurality of pixels adjacent to said first pixel; circuitryto determine a weighted average value of the target pixel and theportion of pixels having a binary value; and circuitry to substitute theweighted average value for the target pixel value.
 38. The apparatus ofclaim 37, wherein the plurality of pixels comprise four pixels adjacentto the target pixel.
 39. The apparatus of claim 37, further comprising:circuitry to determine an absolute value of a difference between thetarget pixel and at least one of the plurality of pixels adjacent to thetarget pixel; and circuitry to compare the determined absolute value toa known value.
 40. The apparatus of claim 39, wherein the known valuecomprises a standard deviation value.